<template>
  <el-dialog
    append-to-body
    :title="info"
    :visible.sync="dialogVisible"
    align="left"
    element-loading-text="拼命加载中"
    element-loading-spinner="el-icon-loading"
    element-loading-background="rgba(0, 0, 0, 0.8)"
    width="1300px">
    <template v-if="dialogVisible">
      <product-stock-log-page v-if="currType==='SupplierProduct'" :product-data="currData"/>
      <product-stock-log-page v-if="currType==='SupplierProductStock'" :product-stock-data="currData"/>
    </template>
  </el-dialog>
</template>

<script>
import ProductStockLogPage from '../Page/ProductStockLogPage'
export default {
  name: 'ShopStockLogListDialog',
  components: {ProductStockLogPage},
  props:{
    successFunction:Function
  },
  data: function () {
    return {
      info:'库存型号-日志-列表',
      dialogVisible: false,
      // 类型: product.商品  productStock.商品库存
      currType:'',
      currData:{}
    }
  },
  mounted () {
  },
  methods: {
    open: function (currType,currData) {

      this.currType=currType
      this.currData=currData
      this.dialogVisible = true
      this.$forceUpdate()
    }
  }
}
</script>

<style scoped>

</style>
